package com.ian.config;

import org.springframework.test.web.servlet.request.RequestPostProcessor;

import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user;

/**
 * If you find you are using the same user in many of your tests, it is recommended to move the user to a method. For example, you can specify the following in your own class named CustomSecurityMockMvcRequestPostProcessors:
 *
 * @author Witt
 * @version 1.0.0
 * @date 2022/5/15
 */
public class CustomSecurityMockMvcRequestPostProcessors {
    public static RequestPostProcessor rob() {
        return user("rob").roles("ADMIN");
    }
}
